package com.zhida.common.component;

import com.zhida.common.mapper.ScheduleMapper;
import jakarta.annotation.Resource;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.stereotype.Component;
/**
 * Create by zhh 2024/7/19 14:31
 */
@Component
@EnableScheduling
public class RedisTask implements SchedulingConfigurer {

    @Resource
    ScheduleMapper scheduleMapper;
    @Resource
    RedisTemplate<String,String> redisTemplate;
    @Resource
    StringRedisTemplate stringRedisTemplate;

    @Override
    public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
//        配置redis定时任务
    }


    private void cachingLikes(){
//        从数据库中读取消息记录
    }


}
